package org.micservice.service;


import org.micservice.ResultMap;
import org.micservice.User;
import org.micservice.config.CustomerServiceException;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@Service
@FeignClient(name = "provider",fallbackFactory = CustomerServiceException.class)
public interface CustomerService {

    @RequestMapping("/provider/getUsers")
    public ResultMap getUsers();

    @RequestMapping("/provider/addUser")
    public ResultMap addUser(@RequestBody  User user);
}
